package com.samplecompany.gui;

import java.util.Collection;
import java.util.List;

import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebPage;

/**
 * 
 */
public class MashupWebPage extends WebPage implements MashupContainer {
	/** */
	private static final long serialVersionUID = 1L;

	private final MashupPanel mashupPanel;

	/**
	 * 
	 */
	public MashupWebPage() {
		super.add(mashupPanel = newMashupPanel());
	}

	/**
	 * @return MashUpPanel
	 */
	protected MashupPanel newMashupPanel() {
		return new MashupPanel("root-mashup-container-id");
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#add(org.apache.wicket.Component)
	 */
	public boolean add(Component component) {
		return mashupPanel.add(component);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#add(int, org.apache.wicket.Component)
	 */
	public void add(int index, Component element) {
		mashupPanel.add(index, element);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#addAll(java.util.Collection)
	 */
	public boolean addAll(Collection<? extends Component> collection) {
		return mashupPanel.addAll(collection);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#addAll(int, java.util.Collection)
	 */
	public boolean addAll(int index, Collection<? extends Component> collection) {
		return mashupPanel.addAll(index, collection);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#clear()
	 */
	public void clear() {
		mashupPanel.clear();
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#contains(java.lang.Object)
	 */
	public boolean contains(Object o) {
		return mashupPanel.contains(o);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#containsAll(java.util.Collection)
	 */
	public boolean containsAll(Collection<?> collection) {
		return mashupPanel.containsAll(collection);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#indexOf(java.lang.Object)
	 */
	public int indexOf(Object o) {
		return mashupPanel.indexOf(o);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#isEmpty()
	 */
	public boolean isEmpty() {
		return mashupPanel.isEmpty();
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#lastIndexOf(java.lang.Object)
	 */
	public int lastIndexOf(Object o) {
		return mashupPanel.lastIndexOf(o);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#remove(java.lang.Object)
	 */
	public boolean remove(Object o) {
		return mashupPanel.remove(o);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#remove(int)
	 */
	public Component remove(int index) {
		return mashupPanel.remove(index);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#removeAll(java.util.Collection)
	 */
	public boolean removeAll(Collection<?> collection) {
		return mashupPanel.removeAll(collection);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#retainAll(java.util.Collection)
	 */
	public boolean retainAll(Collection<?> collection) {
		return mashupPanel.retainAll(collection);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#set(int, org.apache.wicket.Component)
	 */
	public Component set(int index, Component element) {
		return mashupPanel.set(index, element);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#subList(int, int)
	 */
	public List<Component> subList(int fromIndex, int toIndex) {
		return mashupPanel.subList(fromIndex, toIndex);
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#toArray()
	 */
	public Object[] toArray() {
		return mashupPanel.toArray();
	}

	/**
	 * @see com.samplecompany.gui.MashUpContainer#toArray(T[])
	 */
	public <T> T[] toArray(T[] a) {
		return mashupPanel.toArray(a);
	}

	public MashupPanel getMashupPanel() {
		return mashupPanel;
	}
}